package org.wzl.springapplication.utils;

import lombok.Data;

import java.util.HashMap;
import java.util.Map;

@Data
public class Result{

    Integer code = 200;
    Map<String, Object> data;

    private Result() {
        data = new HashMap<>();
    }

    public static Result add_(String key, Object value) {
        Result result = new Result();
        result.data.put(key, value);
        return result;
    }

    public Result add(String key, String value) {
        data.put(key, value);
        return this;
    }

}
